package cn.zktr.Personnel.controllers.tanyali;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.support.config.FastJsonConfig;

import cn.zktr.Personnel.model.pojos.PerEmaTrts;
import cn.zktr.Personnel.model.service.tantiantian.TngPojService;
//import cn.zktr.Personnel.common.BeanConfig;
import cn.zktr.Personnel.model.service.tanyali.EmaAgtService;
import cn.zktr.Personnel.model.service.tanyali.EmaDaService;
import cn.zktr.Personnel.model.service.tanyali.EmaFebService;
import cn.zktr.Personnel.model.service.tanyali.EmaOutService;
import cn.zktr.Personnel.model.service.tanyali.EmaQsbService;
import cn.zktr.Personnel.model.service.tanyali.EmaTmService;
import cn.zktr.Personnel.model.service.tanyali.EmaTrtsService;
import cn.zktr.Personnel.model.service.tanyali.EmaTsService;
import cn.zktr.Personnel.model.service.tanyali.EmaZkzService;
import net.minidev.json.JSONObject;

@Controller
public class demo3Controller {
	
	@Autowired
	private EmaTrtsService trts;
	@Autowired
	private EmaOutService out;
	
	@RequestMapping("tyl/gai-shi-juan")
	public void demo10(Model model,String ZKZID) {
		model.addAttribute("gsjs", out.pigaishijuan(ZKZID));
	}
	
	@RequestMapping("ceshia")
	@ResponseBody
	public JSONArray demo10ss(String ZKZID) {
		return out.pigaishijuan(ZKZID);
	}
	
	@PostMapping("zongfentijiao")
	@ResponseBody
	public String demo13(Integer DAID,Integer IONID,String TRTSFENS) {
		 out.zfxz(DAID,TRTSFENS);
		 out.addKaoShiJieGuo(IONID);
		 return "";
	}
	
	@PostMapping("shijuanpigaiselect")
	@ResponseBody
	public int shijuanpigaiselect(Integer ZKZID) {
		return trts.shijuanpigaiselect(ZKZID);
	}
	
	@RequestMapping("ceshiaaa")
	@ResponseBody
	public JSONArray demo10(String ZKZID) {
		return out.pigaishijuan(ZKZID);
	}
	
	@RequestMapping("ceshiaaas")
	@ResponseBody
	public JSONArray demo10s(String ZKZREM) {
		return out.pigaishijuanss(ZKZREM);
	}
	
	
	@RequestMapping("tyl/shi-juan")
	public void demo15() {}
	
	
	
}
